#include "UniFind.h"

int* Create_UniFSet(int size)
{
    int *unif_arr = new int[size];
    for (int i = 0; i < size; ++i)
    {
        unif_arr[i] = i;
    }
}

int FindBoss(int *unifArr, int value)
{
    if(unifArr[value] == value)
        return value;
    unifArr[value] = FindBoss(unifArr, unifArr[value]);
    return unifArr[value];
}

int Merge(int* unifArr, int a, int b)
{
    a = FindBoss(unifArr, a);
    b = FindBoss(unifArr, b);
    if(a != b)
    {
        unifArr[b] = a;
        return 1;
    }
    return 0;
}